package com.zhaoyang.test.jdbcTemplate;

import com.zhaoyang.util.JDBCUtils;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @author 赵扬
 * @time 2020/4/27 08:46
 */
public class JdbcTemplateDemo01 {

    public static void main(String[] args) {

        // 创建JDBCTemplate对象
        JdbcTemplate jdbcTemplate = new JdbcTemplate(JDBCUtils.getDataSource());
        String sql = "update s_admin set password = 123 where name=?";
        int cnt = jdbcTemplate.update(sql, "zhao");
        System.out.println(cnt);
    }
}
